package com.example.factory.responsibility.chain.builder;

import com.example.factory.responsibility.chain.DefaultProcessSlotChain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ProcessChainBuilder {
    @Autowired
    ProcessChainBuilder processChainBuilder;
    private DefaultProcessSlotChain defaultProcessSlotChain = null;

    DefaultProcessSlotChain getProcessSlotChain() {
        if (defaultProcessSlotChain == null) {
            defaultProcessSlotChain = processChainBuilder.getProcessSlotChain();
            return defaultProcessSlotChain;
        }
        return defaultProcessSlotChain;
    }
}
